package chapter1;

public class Primitives {
   public static void main(String[] args){
	   char c = (char)70000;
	   System.out.println("Value of char c: (char)70000:");
	   System.out.println(Integer.valueOf(c));
	   
	   c = (char)-98;
	   System.out.println("Value of char c:(char)-98:");
	   System.out.println(Integer.valueOf(c));
	   
	   c = (char)0x892;
	   System.out.println("Value of char c:(char)0x892:");
	   System.out.println(Integer.valueOf(c));
	   c = (char)5656;
	   System.out.println("Value of char c:(char)5656:");
	   System.out.println(Integer.valueOf(c));
	   
	   int i = 
	   (int)Math.pow(2,14)+
	   (int)Math.pow(2,13)+
	   (int)Math.pow(2,12)+
	   (int)Math.pow(2,11)+
	   (int)Math.pow(2,10)+
	   (int)Math.pow(2,9)+
	   (int)Math.pow(2,8)+
	   (int)Math.pow(2,7)+
	   (int)Math.pow(2,6)+
	   (int)Math.pow(2,5)+
	   (int)Math.pow(2,4)+
	   (int)Math.pow(2,3)+
	   (int)Math.pow(2,2)+
	   (int)Math.pow(2,1)+
	   (int)Math.pow(2,0)
	   ;
	   
	   System.out.println("Value of char i: "+i);
	   
	   i = (int)Math.pow(2,0);
	   System.out.println("Value of char i: "+i);
	   
	   int b = 
	   (int)Math.pow(2,6)+
	   (int)Math.pow(2,5)+
	   (int)Math.pow(2,4)+
	   (int)Math.pow(2,3)+
	   (int)Math.pow(2,2)+
	   (int)Math.pow(2,1)+
	   (int)Math.pow(2,0);
	   System.out.println("Value of int b: "+b);
	   
	   b= (int)Math.pow(2, 15);
	   System.out.println("Value of int b: "+b);
   }
}
